home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / models / weapons / g43.tik < prev    next >
Encoding:
Text File  |  2002-10-21  |  7.0 KB  |  264 lines

  1. TIKI
  2.  
  3. setup
  4. {
  5.     scale 0.52            // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
  6.     path models/weapons/g43
  7.     skelmodel g43.skd
  8.     surface g43cull     shader g43cull
  9.     surface g43         shader g43
  10.     surface svt_lens     shader svt_lens
  11.     surface g43_clip     shader g43
  12. }
  13. $define sounddir sound/weapons
  14.  
  15. init
  16. {
  17.     server
  18.     {
  19.     //========================================//
  20.     //        WEAPON NAME          //
  21.     //========================================//
  22.         classname        Weapon
  23.         weapontype        rifle
  24.         name            "G 43"
  25.         rank            230 230
  26.  
  27.     //========================================//
  28.     //        WEAPON ACCURACY       //
  29.     //========================================//
  30.         //Gewehr 43 Semi-automatic Sniping Rifle (7.92x57mm Mauser)
  31.  
  32.         sp bulletrange            4000             //the range at which bulletspread is applied
  33.         sp bulletspread            59 59 140 140         //minpitch minyaw maxpitch maxyaw
  34.         sp zoomspreadmult        0.055            //bulletspread accuracy boost multiplier when zoomed
  35.  
  36.         dm bulletrange            4000
  37.         dm bulletspread            59 59 300 300        //further increased to encourage standing still while firing
  38.                                     //and to counteract the fact that you move slower with the weapon
  39.         dm zoomspreadmult        0.055
  40.  
  41.         realism bulletrange        4000
  42.         realism bulletspread        35 35 100 100    
  43.  
  44.         realism zoomspreadmult        0.055
  45.  
  46.     //========================================//
  47.     //        DAMAGE / RATE OF FIRE      //
  48.     //========================================//
  49.         sp bulletdamage            100
  50.         dm bulletdamage            100    
  51.         sprealism bulletdamage        100    
  52.         dmrealism bulletdamage        100    
  53.  
  54.         sp firedelay            1.45
  55.         dm firedelay            1.45
  56.         realism firedelay        1.45
  57.  
  58.         realism throughwood        24
  59.         realism throughmetal        8
  60.  
  61.     //========================================//
  62.     //        PLAYER MOVEMENT          //
  63.     //========================================//
  64.         sp movementspeed        0.91
  65.         sp zoommovement            0.5
  66.  
  67.         dm movementspeed        0.825
  68.         dm zoommovement            0.5
  69.  
  70.         realism movementspeed        0.825
  71.         realism zoommovement        0.5
  72.  
  73.     //========================================//
  74.     //    RIFLE BUTT / SECONDARY FIRE      //
  75.     //========================================//
  76.  
  77.     //========================================//
  78.     //        AMMO              //
  79.     //========================================//
  80.         firetype            bullet
  81.         ammotype            "rifle"
  82.         meansofdeath            bullet
  83.         semiauto
  84.         clipsize            10
  85.         ammorequired            1
  86.         bulletlarge            1
  87.  
  88.         sp startammo            10
  89.         dm startammo            50
  90.         sprealism startammo        10
  91.         dmrealism startammo        50
  92.  
  93.         // Additional DM Loadout
  94.         dm additionalstartammo "grenade" 1
  95. //        dm additionalstartammo "smokegrenade" 1
  96.  
  97.         // Additional DM Loadout
  98.         dmrealism additionalstartammo "grenade" 1
  99. //        dmrealism additionalstartammo "smokegrenade" 1
  100.  
  101.     //========================================//
  102.     //        TRACERS, CROSSHAIR, ZOOM  //
  103.     //========================================//
  104.         crosshair            1
  105.         zoom                30
  106.  
  107.     //========================================//
  108.     //        SOUND, AI, OTHER      //
  109.     //========================================//
  110.         // AI animation group info
  111.         weapongroup            rifle
  112.         airange                sniper
  113.  
  114.         pickupsound            springfield_snd_pickup
  115.         ammopickupsound            springfield_snd_pickup_ammo
  116.         noammosound            springfield_snd_noammo
  117.     }
  118.     client
  119.     {
  120.         // this is attached to the player during reload
  121.         cache models/ammo/springfield_clip_reload.tik
  122.  
  123.         cache muzsprite.spr
  124.         cache vsssource.spr    
  125.         cache models/fx/muzflash.tik
  126.         cache model models/fx/snipesmoke.tik
  127.         cache vsssource.spr
  128.     }
  129. }
  130.  
  131. animations
  132. {
  133.  
  134.     idle    g43.skc
  135.  
  136.     reload    g43_reload.skc 
  137.     {
  138.         server
  139.         {
  140.             16 surface g43_Clip +nodraw
  141.             50 surface g43_Clip -nodraw
  142.             last idle
  143.         }
  144.         client
  145.         {
  146.             entry sound gewehr43_snd_reload
  147.         }
  148.     }
  149.     fire    g43.skc
  150.     {
  151.         server
  152.         {
  153.             entry shoot
  154.         }
  155.         client
  156.         {
  157.             entry stopaliaschannel gewehr43_snd_fire
  158.             entry sound gewehr43_snd_fire
  159.  
  160.             // By now, the server has already fired the weapon, so it's
  161.             // ok to apply the view kick apon entry to avoid problems
  162.             // with multiple application on single frame animations.
  163.  
  164.             ////////////////////////////////////////////////////////////////////////////////////////
  165.             // View Kicking
  166.             //
  167.             // View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
  168.             // a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
  169.             // will be explained.
  170.             // Scatter Patterns:
  171.             // "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
  172.             // "T" - the T shape. The gun has a tendancy to push in a paticular direction.
  173.             //
  174.             //
  175.             //                     +-------------------------------------------- Scatter Pitch Min
  176.             //                  |    +--------------------------------------- Scatter Pitch Max
  177.             //                  |    |       +------------------------------- Scatter Yaw Min
  178.             //                     |    |       |   +--------------------------- Scatter Yaw Max
  179.             //                     |    |       |   |     +--------------------- The Recentering speed in degrees per second
  180.             //                  |    |       |   |     |    +---------------- The Scatter Pattern
  181.             //                     |    |       |   |     |    |     +---------- The absolute pitch min/max
  182.             //                     |    |       |   |     |    |     |  +------- The absolute yaw min/max
  183.             //                     |    |       |   |     |    |     |  | +----- This is the pitch at which you loose all
  184.             //                     |    |       |   |     |    |     |  | |      control of the weapon and its behavior is
  185.             //                      |    |       |   |     |    |     |  | |      purely random.
  186.             //            V    V       V   V     V    V     V  V V
  187.             entry viewkick          -24.0 -18.0   -16.0 16.0 3.0 "T"    8 8 8
  188.  
  189.             // muzzle flash
  190.             entry tagdlight tag_barrel 0.3 0.20 0.175 300 0.25 -1.0 -0.75 -0.2
  191.  
  192.             entry tagspawnlinked tag_barrel
  193.             (
  194.                 count 1
  195.                 model models/fx/muzflash.tik
  196.                 color 0.00 0.00 1.00
  197.                 scale 0.07
  198.                 life 0.01
  199.                 velocity 300.00
  200.                 offsetalongaxis 3 0 0
  201.                 alignstretch 0.08
  202.                 randomroll
  203.             )
  204.  
  205.             entry tagspawnlinked tag_barrel
  206.             (
  207.                 count 1
  208.                 model muzsprite.spr
  209.                 color 1.00 1.00 1.00
  210.                 scale 0.09
  211.                 life 0.04
  212.                 offsetalongaxis 4 0 0
  213.             )
  214.  
  215.             entry commanddelay 0.020 tagspawn tag_barrel
  216.             (
  217.                 spawnrate 1.00
  218.                 model vsssource.spr
  219.                 count 1
  220.                 alpha 0.10
  221.                 color 1.00 1.00 1.00
  222.                 spritegridlighting
  223.                 scale 0.09
  224.                 life .9
  225.                 scalerate 23.00
  226.                 velocity 429.00
  227.                 accel 0.00 20.00 30.00
  228.                 friction 2.00
  229.                 fade
  230.                 offsetalongaxis random 4 0 0
  231.             )
  232.  
  233.             entry tagspawn tag_barrel
  234.             (
  235.                 count 1
  236.                 scale .7
  237.                 model models/fx/snipesmoke.tik
  238.             )
  239.  
  240.             entry tagspawn tag_eject 1024
  241.             (
  242.                 spawnrange 2048
  243.                 count 1
  244.                 model models/ammo/rifleshell.tik
  245.                 scale 1.0
  246.                 velocity 70
  247.                 randvel crandom 10 crandom 10 random 20
  248.                 emitterangles 0 0 0
  249.                 avelocity crandom 90 crandom 90 0
  250.                 accel 0 0 -800
  251.                 physicsrate 20
  252.                 life 2.0
  253.                 fadedelay 1.7
  254.                 collision
  255.                 bouncefactor 0.2
  256.                 bouncesoundonce snd_rifle_shell
  257.             )
  258.         }
  259.     }
  260. }
  261.  
  262. /*QUAKED addon_playerweapon_german_g43 (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
  263. German sniper rifle - G43.
  264. */